<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('blog_categories', function (Blueprint $table) {
            $table->id()->comment('编号');
            $table->string('name', 50)->comment('名称');
            $table->string('description')->nullable()->comment('描述');
            $table->integer('sort')
                ->unsigned()
                ->default(1)
                ->comment('序号');
            $table->tinyInteger('status')
                ->unsigned()
                ->default(1)
                ->comment('状态:0=隐藏,1=显示');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('【博客】文章分类表');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('blog_categories');
    }
};
